import useRequest from '@/hooks/useRequest';
const { request, upload } = useRequest();
// 根据id 获取用户信息
export const getProfileById = (data ?: any) => {
	return request({
		url: 'currency/member/get_profile_by_id',
		method: 'get',
		data
	});
};
// 通过uuid 或者 id 获取用户手机号
export const getUseryPhone = (data ?: any) => {
	return request({
		url: 'currency/member/get_usery_phone',
		method: 'get',
		data
	});
};

// 通过uuid 获取用户信息
export const getProfileByuuid = (data ?: any) => {
	return request({
		url: 'currency/member/get_profile_by_uuid',
		method: 'get',
		data
	});
};

// 获取用户信息
export const getUserInfo = () => {
	return request({
		url: 'currency/member/profile'
	});
};

// 获取一级分类
export const getCategoryFirstList = (data ?: any) => {
	return request({
		url: 'currency/category/get_first_list',
		data
	});
};

// 获取二级分类
export const getCategoryTwoList = (data ?: any) => {
	return request({
		url: 'currency/category/get_two_list',
		data
	});
};

// 修改资料上传
export const upprofile = (data ?: any) => {
	return request({
		url: 'currency/member/upprofile',
		method: 'post',
		data: data
	});
};
// 修改密码
export const doUppwd = (data ?: any) => {
	return request({
		url: 'currency/member/uppwd',
		method: 'post',
		data: data
	});
};
// 获取帮助列表
export const getHelpList = (data ?: any) => {
	return request({
		url: 'currency/member/hlep_list',
		data: data
	});
};
// 提交反馈
export const addKfMsg = (data ?: any) => {
	return request({
		url: 'currency/member/kf_pub',
		method: 'post',
		data: data
	});
};
// 获取配置
export const getConfig = (data ?: any) => {
	return request({
		url: 'currency/platform/get_config',
		method: 'post',
		data: data
	});
};

// 上传
export const uploadImgFile = (data ?: any) => {
	return upload(data);
};

// 上传
export const uploadFile = (data ?: any) => {
	return upload(data, 'currency/common/uploadfile');
};
// 查询订单配置
export const getASKOrderInfo = (data ?: any) => {
	return request({
		url: 'currency/common/query_pay_status',
		method: 'POST',
		data
	});
};

// 结束咨询订单
export const askOrderEnd = (data ?: any) => {
	return request({
		url: 'currency/common/order_end',
		method: 'POST',
		data
	});
};
// 查询案件详情
export const queryCaseOrderInfo = (data ?: any) => {
	return request({
		url: 'currency/anjian/query_anjian_order_info',
		method: 'POST',
		data
	});
};

// 查询案件详情
export const queryWeikuanPayStatus = (data ?: any) => {
	return request({
		url: 'currency/anjian/query_weikuan_pay_status',
		method: 'POST',
		data
	});
};

// 获取省份
export const getProvinceList = (data ?: any) => {
	return request({
		url: 'currency/common/get_province_list',
		method: 'get',
		data,
		custom: {
			auth: false,
		},
	});
};
// 根据省份获取市
export const getCityList = (data ?: any) => {
	return request({
		url: 'currency/common/get_city_list',
		method: 'get',
		data,
		custom: {
			auth: false,
		},
	});
};

// 查询订单配置
export const getComOrder = (data ?: any) => {
	return request({
		url: 'currency/common/query_order',
		method: 'POST',
		data
	});
};